package com.neu.demo02.controller;

import com.neu.demo02.dto.BookDto;
import com.neu.demo02.service.BookService;
import com.neu.demo02.util.CommonResult;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@CrossOrigin
@RestController
@RequestMapping("/book")
public class BookController {
    @Resource
    private BookService bookService;

    @RequestMapping("/findByParam")
    public CommonResult findByParam(@RequestBody BookDto dto){
        return bookService.findByParam(dto);
    }

}
